
<?php
    include ('../login/authenticated.php');
    #include ('../upload/upload.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <title>Web site</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="title" content="Web site" />
        <meta name="description" content="Site description here" />
        <meta name="keywords" content="keywords here" />
        <meta name="language" content="en" />
        <meta name="subject" content="Site subject here" />
        <meta name="robots" content="All" />
        <meta name="copyright" content="Your company" />
        <meta name="abstract" content="Site description here" />
        <meta name="MSSmartTagsPreventParsing" content="true" />
        
        <link id="theme" rel="stylesheet" type="text/css" href="../../css/style.css" title="theme" />
        <script type="text/javascript" language="javascript" src="../../js/jquery.js"></script>
        <script type="text/javascript" language="javascript" src="../../js/custom.js"></script>
        <script type="text/javascript" language="javascript" src="../../js/addon.js"></script>
    </head>
    <body> 

        <div id="wrapper"> 
            <div class="overlay"></div>  
            <div class="border-top"></div>  
            <div class="content"> 
                <div id="container"> 
                    <div class="hd"> 
                        <div id="container-top"> 
                            
                        </div>  
                        <div id="banner">
                           
                            <div id="suchfeld">
                                <form style="display:inline">

                                    <input type="text" name="firstname" /> suchen

                                </form>
                            </div> 
                            <div id="hmenu-wpr"> 
                                <ul id="hmenu" class="sf-menu sf-js-enabled sf-shadow">
                                    <li class="current" style="border:none"> 
                                        <a class="toplvl sf-with-ul" href="../../index.php">Home</a>
                                    </li>
                                    <li> 
                                        <a href="../upload/upload.php" class="toplvl">Ressource</a>  
                                        <ul>
                                            <li> 
                                                <a href="../download/download.php">Bachelor</a> 
                                            </li>
                                            <li class="current"> 
                                                <a href="../download/download.php">Master</a>  

                                            </li>
                                        </ul> 
                                    </li>

<!--                                    <li> 
                                        <a class="toplvl" href="#">Mein Profil</a>  
                                        <ul>
                                            <li> 
                                                <a href="#">Einstellungen</a> 
                                            </li>
                                             <li> 
                                                <a href="#">Profil bearbeiten</a> 
                                            </li>
                                             <li> 
                                                <a href="#">Freunde</a> 
                                            </li>

                                        </ul> 
                                    </li>  -->
                                    <li> 
                                        <a class="toplvl" href="#">News</a> 
                                        <ul>
                                            <li> 
                                                <a href="#">Aktuel</a> 
                                            </li>
                                            <li> 
                                                <a href="#">Archive</a> 
                                            </li>
                                        </ul>
                                    </li>
                                    <li> 
                                        <?php
              if(is_authenticated()) {
                  echo '<li> 
                          <a class="toplvl" href="module/login/logout.php">Logout</a>  
                       </li>';
              } else {
                  echo '<li> 
                          <a class="toplvl" href="login.php">Login</a>  
                       </li>';
              }
                                       
?>    
                                    </li>  
                                </ul> 
                            </div>  
                        </div>  

                        <div class="bd"> 
                            <div id="page"> 
                                <!-- SIDEBAR  -->  
                                <div id="sidebar"> 
                                    <div class="content"> 
                                        <div class="sidebox1"> 
                                            <h2>Side Box Menu</h2>  
                                            <div class="vmenu"> 
                                                <ul>
                                                    <li>
                                                        <a href="#">Category 1</a>
                                                    </li>
                                                    <li>
                                                        <a href="#">Category 2</a>
                                                    </li>
                                                    <li>
                                                        <a href="#">Category 3</a>
                                                    </li>
                                                    <li>
                                                        <a href="#">Category 4</a>
                                                    </li>
                                                    <li>
                                                        <a href="#">Category 5</a>
                                                    </li>
                                                </ul> 
                                            </div> 
                                        </div>  
                                        <div> 
                                            <img src="../images/business-man-1.png" style="width:100%" /> 
                                        </div>  
                                        <div class="sidebox1"> 
                                            <h2>Side Box Heading</h2>  
                                            <p></p> 
                                        </div> 
                                    </div> 
                                </div>  
                                <!-- END SIDEBAR  -->  
                                <!-- MAIN COLUMN -->  
                                <div id="main"> 
<!--                                    <div class="content">-->
<!--                                        <div id="login_hd">
                                            <h3></h3>  
                                             <p> 
                                               <img src="images/bizwoman-1.png" style="float:right;margin-left:20px" /> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi.
                                             </p>    
                                             <h2 style="margin-top:35px;">Heading h2</h2>    
                                        </div>-->
<!--                                        <div id="conten">-->
    <?php
include_once ('/../../dao_class/Ressource.php');
include_once ('/../../dao_class/RessourceDao.php');
include_once ('/../../dao_class/Datasource.php');
include_once ('/../../dao_class/UserDao.php');
include_once ('/../../dao_class/User.php');
 

class Datei_download {
    
        
    static function ressourceEinlesen() {

        $server = 'localhost';
        $dbname = 'ai-vas';
        $user = 'root';
        $password = '';
        
         # Connection a la basse de donnée
       
       $conn = new Datasource($server, $dbname, $user, $password);
       $sql = 'SELECT * FROM ressource';
     
     $tito = $conn->execute($sql);
     $total = mysql_num_rows($tito);
      
    // si on a récupéré un résultat on l'affiche.
if($total) {
    
    // début du tableau
        echo '<p><table bgcolor="#FFFFFF" border="2">'."\n";
        // première ligne on affiche les titres prénom et surnom dans 2 colonnes
        echo '<tr>';
        echo '<p><td bgcolor="#669999" height=50 width=350><b><u> Datei Downloaden </u></b></td></p>';
        echo '<p><td bgcolor="#669999"><b><u>  </u></b></td></p>';
        echo '<td bgcolor="#669999" width=150><b><u> Fach </u></b></td>';
        #echo '<td bgcolor="#669999"><b><u> Datei Downloaden </u></b></td>';
        #echo '<td bgcolor="#669999"><b><u>Loeschen</u></b></td>';
        echo '</tr>'."\n";
        while ($row = $conn->nextRow($tito)){
        echo '<tr>';
        echo '<td bgcolor="#CCCCCC"><p><a href="'.$row['speicherOrt'].'"><img src="PDF_g.png" alt="Grafik">'.$row['name'].'</a></td></p>';
        echo '<td bgcolor="#CCCCCC"> </td>';
        echo '<td bgcolor="#CCCCCC"> '.$row['fach'].' </td>';
        #echo '<td bgcolor="#CCCCCC"><a href="'.$row['speicherOrt'].'"><img src="PDF_p.png" alt="Grafik">'.$row['name'].'</a></td>';
//        echo '<td bgcolor="#CCCCCC"><a href="trunk/module/loeschen/loeschen.php?id_ressource='.$row['id_ressource'].'">
//                Loeschen </a></td>';
        echo '</tr></p>'."\n";
    }
    
    echo '</table>'."\n";
    // fin du tableau.
}
else
echo 'Pas d\'enregistrements dans cette table...';

mysql_free_result($tito);

    }
}
$datei_download = new Datei_download();
$datei_download->ressourceEinlesen();
?>
                                            </div>
                                         </div>
                                    </div> 
                                </div>  
                                <!-- END MAIN -->  
                                <!-- SIDEBAR 2  -->  
                                <div id="sidebar2"> 
                                    <div class="content"> 
                                        <div class="sidebox2"> 
                                            <h2>Sidebar Bloc</h2>  
                                            <div class="vmenu"> 
                                                <ul>
                                                    <li>
                                                        <a href="#">Lorem Ipsum</a>
                                                    </li>
                                                    <li>
                                                        <a href="#">Suspendisse</a>
                                                    </li>
                                                    <li>
                                                        <a href="#">Maecenas</a>
                                                    </li>
                                                    <li>
                                                        <a href="#">Sed non risus</a>
                                                    </li>
                                                    <li>
                                                        <a href="#">Consectetuer</a>
                                                    </li>
                                                </ul> 
                                            </div> 
                                        </div>  
                                        <div class="sidebox2"> 
                                            <h2></h2>  
                                            <p></p>  
                                            <div style="margin-top:20px"> 
<!--                                                <img src="images/cross-browser.png" style="width:100%" /> -->
                                            </div>  
                                            <p style="margin-top:20px"></p> 
                                        </div> 
                                    </div> 
                                </div>  
                                <!-- END SIDEBAR 2  -->  
                                <div class="clear" style="height:60px"></div> 
                            </div> 
                        </div>  
                        <div class="ft"> 
                            <div id="footer"> 
                                <div class="content"> 
                                    <p>
                                        <a href="http://www.dotemplate.com"></a> 
                                    </p> 
                                </div> 
                            </div>  
                            <div id="container-bottom"></div> 
                        </div> 
                    </div>
            <div class="clear"></div> 
       
    </body>
</html>
